package org.txazo.stat.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.txazo.stat.dao.UserDao;
import org.txazo.stat.service.UserService;
import org.txazo.stat.vo.User;

/**
 * 用户模块业务逻辑实现
 * 
 * @author Tu XiaoZhou
 * @since 2013-04-12
 */
@Transactional
@Service("userService")
public class UserServiceImpl implements UserService {

	@Autowired
	private UserDao userDao;

	@Override
	public boolean isAccountExist(String account) {
		return userDao.isAccountExist(account);
	}

	@Override
	public User login(String account, String password) {
		return userDao.login(account, password);
	}

	@Override
	public void register(User user) {
		userDao.register(user);
	}

	@Override
	public void updatePassword(int id, String password) {
		userDao.updatePassword(id, password);
	}

}
